﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using LogFilter.Service;
using Microsoft.AspNetCore.Mvc;

namespace LogFilter.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        private WeatherService weatherService;
        public ValuesController(WeatherService weatherService)
        {
            this.weatherService = weatherService;
        }
        // GET api/values
        [HttpGet]
        public async Task<ActionResult> Get()
        {
            var result = await weatherService.getData();

            return new JsonResult(new { result });
        }

    }
}
